package fr.cie.blog.domainservice;


import java.util.List;

import fr.cie.blog.beans.Card;
import fr.cie.blog.beans.User;
import fr.cie.blog.modeldao.hib.CardDaoImplHib;

/**
 * @author AetM
 * 
 */
public class ServiceCardDao implements IServiceCard {
	/**
	 * serviceCardImpl.
	 */
	private final IServiceCard serviceCardImpl = new CardDaoImplHib();

	@Override
	public final int save(final Card card) {
		return serviceCardImpl.save(card);
	}

	@Override
	public final int delete(final Card card) {
		return serviceCardImpl.delete(card);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see fr.cie.blog.domainservice.IServiceGeneric#findAll()
	 */
	@Override
	public final List<Card> findAll() {
		return serviceCardImpl.findAll();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see fr.cie.blog.domainservice.IServiceGeneric#findById(int)
	 */
	@Override
	public final Card findById(final long pIdentifier) {
		return serviceCardImpl.findById(pIdentifier);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * fr.cie.blog.domainservice.IServiceCard#findByUser(fr.cie.blog.beans.User)
	 */
	@Override
	public final Card findByUser(final User pUser) {
		return serviceCardImpl.findByUser(pUser);
	}

	@Override
	public final int update(final Card card) {
		return serviceCardImpl.update(card);
	}

}